﻿Public Class Form1
  Private Sub Form1_Click(ByVal sender _
          As Object, _
          ByVal e As System.EventArgs) _
          Handles Me.Click
    Dim colore As New Color
    colore = Me.BackColor
    For i As Integer = 1 To 5
      Me.BackColor = Color.Red
      Application.DoEvents()
      System.Threading.Thread.Sleep(1000)
      Me.BackColor = Color.Yellow
      Application.DoEvents()
      System.Threading.Thread.Sleep(1000)
    Next
    Me.BackColor = colore
  End Sub
End Class

